﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Web.Services.Protocols;
using EconomicInformationServiceWcf.ServiceBehaviours;
using Interfaces.Enums;
using ServiceInfrastructure.Models.EconomicModels;
using ServiceInfrastructure.Models.Exceptions;
using ServiceInfrastructure.Models.SecurityModels;
using ServiceInfrastructure.ServiceConstants;

namespace EconomicInformationServiceWcf
{
    [ServiceContract(Name = ServiceConstants.EconomicServicecontract, Namespace = ServiceConstants.EconomicServicenamespace)]
    [EISHeaders]
    [EISApplication]
    public interface IEconomicInformationService
    {
        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetSectorResponse GetSector(GetSectorRequest request) ;

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetSectorsResponse GetSectors(GetSectorsRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetIndustryResponse GetIndustry(GetIndustryRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetIndustriesResponse GetIndustries(GetIndustriesRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetCompanyResponse GetCompany(GetCompanyRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetCompaniesResponse GetCompanies(GetCompaniesRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetQuoteResponse GetQuote(GetQuoteRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetQuoteisResponse GetQuoteis(GetQuoteisRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetPairResponse GetPair(GetPairRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetPairsResponse GetPairs(GetPairsRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetRateResponse GetRate(GetRateRequest request);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(BusinessFault))]
        [EISHeader(ServiceConstants.Headername, typeof(EISSession), Direction = SoapHeaderDirection.In)]
        [EISAutorize(Permissions = new[] { RoleType.User, RoleType.Admin })]
        GetRatesResponse GetRateis(GetRatesRequest request);
    }
}
